var Event = {
    bind : function(el,type,fn){
        if(el.addEventListener){
            el.addEventListener(type, fn, false);
        }else{
            el.attachEvent("on" + type, function(){
                fn.id = arguments.callee;
                var e = window.event;
                e.preventDefault = function(){
                    this.returnValue = true;
                };
                e.stopPropagation = function(){
                    this.cancelBubble = true;
                };
                fn.call(el,e);
            });
        }
    },
    unbind : function(el,type,fn) {
        if(el.removeEventListener){
            el.removeEventListener(type, fn, false);
        }else{
            el.detachEvent("on" + type, fn.id||fn);
        }
    }
}
export default Event;